using MinimalistFoodStreet.BackEnd.Infrastructure.EFCore;
using MinimalistFoodStreet.BackEnd.Infrastructure.Dtos.Response.Tables;
using MinimalistFoodStreet.BackEnd.Infrastructure.Tools;

namespace MinimalistFoodStreet.BackEnd.Server.Server.ResponseExtend.Tables 
{
	public static class LoginLogsEnitityExtend 
	{
		public static ResponseLoginLogsDto ToResponseDto(this LoginLog entity)
		{
			return new ResponseLoginLogsDto ()
			{

					id = entity.LlId,
					accountId = entity.LlAccountId,
					code = entity.LlCode,
					ip = entity.LlIp,
					way = entity.LlWay,
					createTime = entity.LlCreateTime,
					createTimeStr = Tools.TimeToString(entity.LlCreateTime),
			};
		}
	}
}